package com.hundun.vision.biz.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author ：RuoChen
 * @date ：21:43 2024/11/29
 * @description：订单持仓方向
 */
@AllArgsConstructor
@Getter
public enum OrderPositionSide {
    BOTH("BOTH", "单一持仓方向"),
    LONG("LONG", "多头 (双向持仓下)"),
    SHORT("SHORT", "空头 (双向持仓下)");

    private String side;
    private String description;

    public static String getDescription(String side) {
        for (OrderPositionSide positionSide : OrderPositionSide.values()) {
            if (positionSide.getSide().equals(side)) {
                return positionSide.getDescription();
            }
        }
        return null;
    }
}
